home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / vampso1a / dock.frm < prev    next >
Text File  |  1999-08-29  |  2KB  |  76 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BackColor       =   &H80000007&
  4.    BorderStyle     =   5  'Sizable ToolWindow
  5.    Caption         =   "Vampire Software: Docking Example"
  6.    ClientHeight    =   3195
  7.    ClientLeft      =   60
  8.    ClientTop       =   300
  9.    ClientWidth     =   4680
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   3195
  14.    ScaleWidth      =   4680
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   3  'Windows Default
  17.    Begin VB.CommandButton Command1 
  18.       Caption         =   "Dock"
  19.       Height          =   615
  20.       Left            =   240
  21.       TabIndex        =   1
  22.       Top             =   2520
  23.       Width           =   4215
  24.    End
  25.    Begin VB.Label Label2 
  26.       Alignment       =   2  'Center
  27.       Appearance      =   0  'Flat
  28.       BackColor       =   &H80000005&
  29.       BorderStyle     =   1  'Fixed Single
  30.       Caption         =   "Http://zap.to/vampsoft/"
  31.       ForeColor       =   &H00000000&
  32.       Height          =   255
  33.       Left            =   240
  34.       TabIndex        =   2
  35.       Top             =   2160
  36.       Width           =   4215
  37.    End
  38.    Begin VB.Label Label1 
  39.       Alignment       =   2  'Center
  40.       Appearance      =   0  'Flat
  41.       BackColor       =   &H80000005&
  42.       BorderStyle     =   1  'Fixed Single
  43.       Caption         =   $"Dock.frx":0000
  44.       ForeColor       =   &H80000008&
  45.       Height          =   845
  46.       Left            =   120
  47.       TabIndex        =   0
  48.       Top             =   120
  49.       Width           =   4455
  50.    End
  51. End
  52. Attribute VB_Name = "Form1"
  53. Attribute VB_GlobalNameSpace = False
  54. Attribute VB_Creatable = False
  55. Attribute VB_PredeclaredId = True
  56. Attribute VB_Exposed = False
  57. Private Sub Command1_Click()
  58.  
  59. Dim ScreenX, ScreenY As Integer
  60. ScreenY = Screen.Height
  61. ScreenX = Screen.Width
  62.  
  63. If Me.Top <= 200 Then Me.Top = 0
  64. If Me.Left <= 200 Then Me.Left = 0
  65.  
  66. If Me.Left >= ScreenX - Me.Width - 200 Then
  67.     Me.Left = ScreenX - Me.Width
  68. End If
  69.  
  70. If Me.Top >= ScreenY - Me.Height - 200 Then
  71.     Me.Top = ScreenY - Me.Height - 420
  72. End If
  73.  
  74. End Sub
  75.  
  76.